﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VipMemberSearchPrint.aspx.cs"
    Inherits="GH.Web.VipManage.VipMemberSearchPrint" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>会员一览信息打印</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #tabCard th
        {
            background-color: #B2DBF7;
            height: 24px;
        }
        #tabCard td
        {
            background-color: #FFFFFF;
            height: 24px;
            text-align: left;
        }
    </style>

    <script language="javascript">
         function printpreview() {// 打印页面预览
             dPrint.style.display = 'none';
             //tabCard.border = "1";
             wb.ExecWB(8,1);
             wb.ExecWB(7,1);
             //window.print();
             dPrint.style.display = 'block';
             //tabCard.border = "0";
        }
        
        function SetPrintSettings() {//控制"纵打、 横打、页面的边距"。

            // -- advanced features
            factory.printing.SetMarginMeasure(2)  // measure margins in inches
            factory.SetPageRange(false, 1, 3)    // need pages from 1 to 3

            factory.printing.printer = "Panasonic KX-P1121"
            factory.printing.copies = 2
            factory.printing.collate = true
            factory.printing.paperSize = "A4"
            factory.printing.paperSource = "Manual feed"

            // -- basic features
            factory.printing.header = false
            factory.printing.footer = false
            factory.printing.portrait = false
            factory.printing.leftMargin = 1.0
            factory.printing.topMargin = 1.0
            factory.printing.rightMargin = 1.0
            factory.printing.bottomMargin = 1.0
        }
        
    </script>

</head>
<body>
    <center>
        <table width="width: 600px" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                    <div id='dPrint' style="text-align: right">
                             <img id="btnPrint" alt="打印" src="../Images/button/btnPrint.gif" onclick="printpreview();"  />
                        <object classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" id="wb" name="wb" height="0"
                            width="0">
                        </object>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <h3>
                        会员信息一览表</h3>
                    <asp:Repeater ID="rptList" runat="server">
                        <HeaderTemplate>
                            <table style="width: 900px; background-color: Silver" cellpadding="0px" cellspacing="0px" border="1">
                                <tr>
                                    <th style="height: 22px; background-color: #B2DBF7">
                                        姓名
                                    </th>
                                    <th style="height: 22px; background-color: #B2DBF7">
                                        单位
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        部门
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        班组
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        身份证号码
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        会员证号码
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        性别
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        入会时间
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        联系电话
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        文化程度
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        政治面貌
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        职称
                                    </th>
                                    <th style="height: 20px; background-color: #B2DBF7">
                                        属性
                                    </th>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="height: 22px; background-color: #FFFFFF" align="left">
                                    <%# DataBinder.Eval(Container.DataItem, "姓名")%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF" align="left">
                                    <%# GetUnitName(DataBinder.Eval(Container.DataItem, "单位"))%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF" align="left">
                                    <%# GetDepartmentName(DataBinder.Eval(Container.DataItem, "部门"))%>&nbsp;
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF" align="left">
                                    <%# GetGroupName(DataBinder.Eval(Container.DataItem, "班组"))%>&nbsp;
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# DataBinder.Eval(Container.DataItem, "身份证号")%>&nbsp;
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# DataBinder.Eval(Container.DataItem, "会员证号")%>&nbsp;
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%#(DataBinder.Eval(Container.DataItem, "性别").ToString()=="0")?"男":"女"%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem, "入会时间")).ToShortDateString()%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# DataBinder.Eval(Container.DataItem, "联系电话")%>&nbsp;
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# GetEducationName(DataBinder.Eval(Container.DataItem, "文化程度"))%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# GetPoliticalName(DataBinder.Eval(Container.DataItem, "政治面貌"))%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# GetTitleName(DataBinder.Eval(Container.DataItem, "职称"))%>
                                </td>
                                <td style="height: 22px; background-color: #FFFFFF">
                                    <%# GetAttrName(DataBinder.Eval(Container.DataItem, "属性"))%>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </table>
    </center>
</body>
</html>
